package com.example.demo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FacadeService {
    /**
     * 门面模式：
     *   创建一个更高一层的接口，用于统一封装子接口
     *   这样一来可以降低用户的使用成本*/

    @Autowired
    private DrawingService drawingService;
    @Autowired
    private BedroomService bedroomService;
    @Autowired
    private CanteenService canteenService;

    public void turnOnAllLights() {
        drawingService.onLight();
        bedroomService.onLight();
        canteenService.onLight();
    }
}
